﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Workflow.ComponentModel;

namespace NintexXTest
{
    public class WriteToFile:NintexX.NintexXAction
    {
        public override void Execute(Hashtable workflowVariables,string inputParam)
        {
            //Read workflow variable
            string fileLoaction = workflowVariables["VAR_1"].ToString();
            string content= workflowVariables["VAR_2"].ToString();
            
            File.WriteAllText(fileLoaction, content);

           
            
            //write workflow variable
            base.SetWorkflowVariableValue("VAR_2", "value from code");
        }

      
    }
}
